package net.entelijan.cobean.examples.showcase.table;

import javax.swing.JButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;

import net.entelijan.cobean.examples.util.ExamplesUtil;
import net.entelijan.scf.DefaultShowcasePanel;
import net.miginfocom.swing.MigLayout;

public class SortTablePanel extends DefaultShowcasePanel {

	private static final long serialVersionUID = 1L;

	private JTable table = new JTable();

	private JButton showSelectionButton = new JButton("Show Selection");

	private JButton deleteSelectionButton = new JButton("Delete Selection");

	private JButton select1SelectionButton = new JButton("Select Row 1");

	private JButton select3SelectionButton = new JButton("Select Row 3");

	public SortTablePanel() {
		super();
		this.table.setName("SortTablePanel.table");
		this.showSelectionButton.setName("SortTablePanel.showSelectionButton");
		this.deleteSelectionButton
				.setName("SortTablePanel.deleteSelectionButton");
		setLayout(new MigLayout());
		add(new JScrollPane(this.table), "w max, h max, wrap");
		add(ExamplesUtil.createButtonsPanel(100, this.showSelectionButton,
				deleteSelectionButton, this.select1SelectionButton,
				this.select3SelectionButton));
	}

	public JTable getTable() {
		return table;
	}

	public void setTable(JTable table) {
		this.table = table;
	}

	public JButton getShowSelectionButton() {
		return showSelectionButton;
	}

	public void setShowSelectionButton(JButton showSelectionButton) {
		this.showSelectionButton = showSelectionButton;
	}

	public JButton getDeleteSelectionButton() {
		return deleteSelectionButton;
	}

	public void setDeleteSelectionButton(JButton deleteSelectionButton) {
		this.deleteSelectionButton = deleteSelectionButton;
	}

	public JButton getSelect1SelectionButton() {
		return select1SelectionButton;
	}

	public void setSelect1SelectionButton(JButton select0SelectionButton) {
		this.select1SelectionButton = select0SelectionButton;
	}

	public JButton getSelect3SelectionButton() {
		return select3SelectionButton;
	}

	public void setSelect3SelectionButton(JButton select3SelectionButton) {
		this.select3SelectionButton = select3SelectionButton;
	}

}
